package utils

import "fmt"

func GetMapValue[T any](mmap map[string]interface{}, key string) (*T, error) {
	if value, ok := mmap[key]; ok {
		if t, ok := value.(T); ok {
			return &t, nil
		}
	}
	return nil, fmt.Errorf("key:%s not exist", key)
}
